package dd.prog2.musterExercises.ws12set07_tanks;

/**
 * Represents a basic tank, which is defined by length, width, and height.
 * 
 * @author Ruediger Lunde
 */
public class CuboidTank extends BasicTank {
	private double length;
	private double width;
	private double height;

	public CuboidTank(double l, double w, double h) {
		length = l;
		width = w;
		height = h;
	}

	@Override
	public double getSurface() {
		return 2 * (length * width + length * height + width * height);
	}

	@Override
	public double getVolume() {
		return length * width * height;
	}

	public String toString() {
		return "CuboidTank(length=" + length + ", width=" + width + ", height="
				+ height + ")";
	}

}
